package com.example.lombok;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * @author shanchong
 * @date 2019-06-23
 **/
@Getter
@Setter
public class GetterSetterDemo {

    private String name;

    private String password;

    private Date createDate;

    private Integer status;

    /**
     * @Getter/@Setter：用在属性上，再也不用自己手写setter和getter方法了，还可以指定访问范围
     * @param args
     */
    public static void main(String[] args) {
        GetterSetterDemo getterSetterDemo = new GetterSetterDemo();
        getterSetterDemo.getCreateDate();
        getterSetterDemo.setCreateDate(new Date());
        System.out.println(getterSetterDemo);
    }



}
